﻿

//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
#include "ace.Vector2DF.h"

//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
namespace ace { 
//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
Vector2DF::Vector2DF()
	: X		( 0.0f )
	, Y		( 0.0f )
{

}

//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
Vector2DF::Vector2DF( float x, float y )
	: X		( x )
	, Y		( y )
{

}

//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
Vector2DF& Vector2DF::operator+=( const Vector2DF& right )
{
	X += right.X;
	Y += right.Y;
	return *this;
}

//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
Vector2DF& Vector2DF::operator-=(const Vector2DF& right)
{
	X -= right.X;
	Y -= right.Y;
	return *this;
}

//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
Vector2DF& Vector2DF::operator*=(float right)
{
	X *= right;
	Y *= right;
	return *this;
}

//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
Vector2DF Vector2DF::operator+(const Vector2DF& right)
{
	auto result = Vector2DF();
	result.X = X + right.X;
	result.Y = Y + right.Y;
	return result;
}

//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
Vector2DF Vector2DF::operator-(const Vector2DF& right)
{
	auto result = Vector2DF();
	result.X = X - right.X;
	result.Y = Y - right.Y;
	return result;
}

//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
Vector2DF Vector2DF::operator*(float right)
{
	auto result = Vector2DF();
	result.X = X * right;
	result.Y = Y * right;
	return result;
}



//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
 } 
//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------